package com.kandroid.designpattern.state.demo1.states;

import com.kandroid.designpattern.state.demo1.ATMAction;
import com.kandroid.designpattern.state.demo1.ATMState;
import com.kandroid.designpattern.state.demo1.BaseStateClass;

public class NoBankCardState extends BaseStateClass {
    public NoBankCardState(ATMAction atmAction) {
        super(atmAction);
    }

    @Override
    public void insertBankCard() {
        print("已插入银行卡，现在可以输入密码或者退卡");
        atm.changeState(ATMState.STATE_HAS_BANKCARD);
    }

    @Override
    public void backBankCard() {
        print("无银行卡，无法退卡");
    }

    @Override
    public void inputPassword() {
        print("无银行卡，无法进行输入密码操作，请插入银行卡");
    }

    @Override
    public void inputMoney(int money) {
        print("无银行卡，无法进行输入取款金额，请插入银行卡");
    }

    @Override
    public void tapOkButton() {
        print("无银行卡，无法进行取款操作，请插入银行卡");
    }

    @Override
    public String getName() {
        return ATMState.STATE_NO_BANKCARD;
    }
}
